#!/usr/bin/env perl

use Test::More tests => 2;
use Data::Dumper;

use WWW::Reddit;

my $r = WWW::Reddit->new( username => '',
                          password => '' );

my $trials = [
              { url => 'http://reddit.com/info/abc123/comments/',
                id  => 'abc123',
           },
              { url => 'http://reddit.com/goto?rss=true&id=t3_63kie',
                id  => '63kie',
           },

              ];

foreach my $trial ( @$trials ) {

    is( $r->get_id_from_url( $trial->{'url'} ), $trial->{'id'}, "found $trial->{'id'}" ) or
      diag( $trial->{'url'} );
}
    
